package com.hoshiicloud.mallshop.feign;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.mallshop.feign.hystrix.ShopPayMentFeignServiceFallback;
import com.hoshiicloud.payment.Paylist;
import com.hoshiicloud.payment.param.RefundRequest;
import com.hoshiicloud.payment.vo.RefundResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 2019/8/27 18:15 qry
 */
@FeignClient(name = "hoshiicloud-payment", fallback = ShopPayMentFeignServiceFallback.class)
public interface ShopPayMentFeignService {
    /**
     * 订单退款
     */
    @PostMapping("/pay/refund")
    Response<RefundResponse> refundOrder(@RequestBody RefundRequest refundRequest);

    /**
     * 根据支付单 id  获取支付流水
     */
    @GetMapping("/payment/paylist/queryOneByPayOrderId/{payOrderId}")
    Response<Paylist> getPaylistByPayOrderId(@PathVariable("payOrderId") String payOrderId);

}
